<!DOCTYPE html>
<html lang="zh" style="background-color: #fff;" >
<head>
<meta charset="utf-8" />
 
<link rel="stylesheet" href="${mvcPath}/dacp-view/aijs/css/ai.css" type="text/css" />
<link href="${mvcPath}/dacp-res/catalog/common/css/ai.meta.css" type="text/css" rel="stylesheet"/>

<script src="${mvcPath}/dacp-lib/jquery/jquery-1.10.2.min.js"></script>
<script src="${mvcPath}/dacp-lib/bootstrap/js/bootstrap.min.js"></script>
<script src="${mvcPath}/dacp-res/catalog/common/js/jquery.tmpl.min.js"></script>

<script src="${mvcPath}/dacp-lib/cryptojs/aes.js"></script>
<script src="${mvcPath}/crypto/crypto-context.js"></script>
<script src="${mvcPath}/dacp-view/aijs/js/ai.core.js"></script>
<script src="${mvcPath}/dacp-view/aijs/js/ai.jsonstore.js"></script>
<script src="${mvcPath}/dacp-view/aijs/js/ai.field.js"></script>
<script src="${mvcPath}/dacp-view/aijs/js/ai.grid.js"></script>
<script src="${mvcPath}/dacp-res/catalog/common/js/ai.meta.widget.js"></script>
<script src="${mvcPath}/dacp-view/aijs/js/ai.treeview.js"></script>
<script src="${mvcPath}/dacp-view/aijs/js/ai.treeview.js"></script>
<script src="${mvcPath}/dacp-res/catalog/dataportal/js/tabPublishMgr.js"></script>
<style>
body {
    font-family: 微软雅黑,Helvetica,Arial,sans-serif;
}
.table td,  .table th {
    padding: 8px 15px;
    border-top: 1px solid #eaeef1;
} 
.nav-tabs {
    border-color: #3099F5;
    border-bottom: 3px solid #3099F5;
}
.nav-tabs>li {
    margin-bottom: 0px;
}
.nav-tabs li.active{
    border-bottom-color: rgb(48, 153, 245);
}
.nav-tabs li.active a{
    color: white;
    background: rgb(48, 153, 245);
}
.nav-tabs>li.active>a, .nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus {
    color: #555;
    cursor: default;
    background-color: rgb(48, 153, 245);
    border: 1px solid #ddd;
    border-bottom-color: transparent;
}
#myTabContent .tab-pane .panel-heading{
    background: #F7FAFA;
    margin: 5px 5px 5px 0px;
}
.padder-v {
    padding-top:  5px;
    padding-bottom:  5px;  
}

</style>

<script>
var xmlid = paramMap.xmlid || 'D_MFI_PIC_TYPE_CAL_A';
var tabColStore, apiInParaStore, apiOutParaStore, dsApiList;
$(document).ready(function() {
	var dsTabInfo=new AI.JsonStore({
		sql: "select * from tablefile where xmlid='" + xmlid + "'",
	    pageSize: -1
	});

	var meta=new  AI.Meta({objtype:'TAB'});
	meta.OBJTYPE="TAB";
	meta.showBaseInfo({containerId:'tabbaseinfo',xmlid:xmlid});

	if(dsTabInfo.getCount()>0) {
		var r=dsTabInfo.getAt(0);
		var apisql="SELECT API_ID,API_NAME,API_NAME_ZH,API_AUTH_TYPE,TOPICCODE,DBNAME,TABLE_NAME,REMARK,BUSI_TYPE,BUILD_TYPE,BUILD_PARA,XMLID,SAMPLE_CODE,APP_CASE,CREATER,EFF_DATE,STATE,STATE_DATE,CURDUTYER,VERSEQ,SQLTEXT FROM do_api_list where BUILD_PARA='"+xmlid+"'";
//		dsApiList=new AI.JsonStore({
//			sql:apisql,
//			key:'API_ID',
//			table:'do_api_list',
//		    pageSize:-1
//		});
		buildTabBaseInfo(r.data);
		buildCardInfo({containerId:"cardinfo",objname:r.get("DATANAME"),cnname:r.get("DATACNNAME"),dbname:'数据资源|'+r.get("DBNAME"),usernum:r.get("FIELDNUM"),usertimes:33});
		buildColGrid();
		buildTabAssertConfig();
		buildApiInstance();
	};
	$("#registerNewApi").click(function(){
		registerNewApi();
		return false;
	})
});
</script>
</head>
<body>
<div class="container-fruit" style="margin:10px 30px 100px 30px">
<div class="row"> 
   <div class="col-lg-3 col-md-3" id="cardinfo"> </div> 
   <div class="col-md-3" style="border: 1px solid #F2F5F5;"> 
    <h4>基本信息</h4> 
    <table class="table table-condensed table-responsive table-user-information"> 
     <tbody> 
      <tr> 
       <td>敏感级别:</td> 
       <td id="RIGHTLEVEL"></td> 
      </tr> 
      <tr> 
       <td>层次:</td> 
       <td id="SCHEMA_NAME">SCHEMA_NAME</td> 
      </tr> 
      <tr> 
       <td>归属主题:</td> 
       <td id="TOPICNAME">TOPICNAME</td> 
      </tr> 
      <tr> 
       <td>状态:</td> 
       <td id="STATE">STATE</td> 
      </tr> 
      <tr> 
       <td>创建时间</td> 
       <td><span id="EFF_DATE"></span><span class="badge" id="VERSEQ">v1.0.0.1</span></td> 
      </tr> 
     </tbody> 
    </table> 
   </div> 
   <div class="col-md-3" style="border: 1px solid #F2F5F5;"> 
    <h4>存储信息</h4> 
    <table class="table table-condensed table-responsive table-user-information"> 
     <tbody> 
      <tr> 
       <td>仓库:</td> 
       <td><span class="label bg-info m-l-xs">Y</span></td> 
      </tr> 
      <tr> 
       <td>web库:</td> 
       <td><span class="label bg-info m-l-xs">Y</span></td> 
      </tr> 
      <tr> 
       <td>云平台:</td> 
       <td><span class="label bg-info m-l-xs">N</span></td> 
      </tr> 
      <tr> 
       <td>地市库:</td> 
       <td><span class="label bg-info m-l-xs">Y</span></td> 
      </tr> 
      <tr> 
       <td>表大小</td> 
       <td>字段数<span id="FIELDNUM"></span>,行:<span id="ROWNUM"></span> </td> 
      </tr> 
     </tbody> 
    </table> 
   </div> 
   <div class="col-md-3" style="border: 1px solid #F2F5F5;"> 
    <h4>应用信息</h4> 
    <table class="table table-condensed table-responsive table-user-information"> 
     <tbody> 
      <tr> 
       <td>当前可用周期:</td> 
       <td><span id="DWDBMIN"></span>-<span id="DWDBMAX"></span> </td> 
      </tr> 
      <tr> 
       <td>ETL引用次数:</td> 
       <td id="REFCOUNT">REFCOUNT</td> 
      </tr> 
      <tr> 
       <td>应用引用次数:</td> 
       <td></td> 
      </tr> 
      <tr> 
       <td>数据生成时间:</td> 
       <td id="STATE"></td> 
      </tr> 
      <tr> 
       <td>重要程度</td> 
       <td></td> 
      </tr> 
     </tbody> 
    </table> 
   </div> 
 </div> 
 <div class="row">
      <div class="col-md-12">
      <ul class="nav nav-tabs"  >
        <li class="active"><a href="#tab2" data-toggle="tab" aria-expanded="true">资产基本配置信息</a></li>
        <li class=""><a href="#tab3" data-toggle="tab" aria-expanded="false">资产字段配置信息</a></li>
        <li class=""><a href="#tab4" data-toggle="tab" aria-expanded="false" style="">资产开放配置</a></li>
        <li class=""><a href="#tab5" data-toggle="tab" aria-expanded="false" style="">资产申请审批记录</a></li>
      </ul>
      
     
    <div class="tab-content">
    
      <div id="tab2" class="tab-pane active">
        <h5>资产化的配置项目</h5>
<!--       	<div class="col-md-4"> <div id="tabbaseinfo"> </div>  </div> -->
      	<div class="col-md-12"> <div id="tabassertinfo"> </div>  </div>
      </div>
      <div id="tab3" class="tab-pane">
          <br><br>
          <div id="tabColgrid"></div>
      </div>
      <div id="tab4" class="tab-pane">
          <div class="col-md-3  " style="min-height:380px;background:#F7FAFA;padding-right:0px">
            
             <section class="panel panel-default"> 
                <header class="panel-heading"> 开放配置<a href="#" id="registerNewApi" class="pull-right" style="color:red">新增</a></li></header> 
                <ul class="list-group" id="refApiList"> 
                 </ul> 
              </section>
   			</div>
   			<div class="col-md-9">
   			   <div id="myTabContent" class="tab-content"> </div>
   			</div>
      </div>
      <div id="tab5" class="tab-pane">
          <h5>无纪律</h5>
	   </div>
      </div>  
    </div>
 </div>

     
</div>
</body>
</html>